<doc>图层选择组件</doc>
<template>
  <select class="layer-select" v-model="layerName">
    <option value="OMS">开放道路底图</option>
    <option value="GDM">高德在线底图</option>
    <option value="TSM">天地图道路底图</option>
    <option value="TSLM">天地图卫星底图</option>
    <option value="Google">谷歌在线底图</option>
  </select>
</template>
<script>
export default {
  props: ["value"], // 底图图层类别

  data() {
    return {
      layerName: this.value,
    };
  },

  watch: {
    layerName() {
      this.$emit("input", this.layerName);
    },
  },
};
</script>
<style scoped>
.layer-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}
</style>
